import request from '@/utils/request'

export function list(data) {
  return request({
    url: '/production/requisition/list',
    method: 'post',
    data: data
  })
}
export function addOrUpdate(data) {
  return request({
    url: '/production/requisition/addOrEdit',
    method: 'post',
    data: data
  })
}
export function remove(data) {
  return request({
    url: '/production/requisition/delete',
    method: 'post',
    data: { deleteIds: data }
  })
}
export function getInfo(data) {
  return request({
    url: '/production/requisition/' + data,
    method: 'get'
  })
}
export function productList(data) {
  return request({
    url: '/production/task/list',
    method: 'post',
    data: data
  })
}
export function getInfoForRequisition(data) {
  return request({
    url: '/production/task/getInfoForRequisition/' + data,
    method: 'get'
  })
}

export function listAllToRequisition(data) {
  return request({
    url: '/product/requisition/listAllToRequisition',
    method: 'post',
    data: data
  })
}
export function listAllToRequisition2(data) {
  return request({
    url: '/product/task/listAllToRequisition',
    method: 'post',
    data: data
  })
}
export function listForReturn(data) {
  return request({
    url: '/product/requisition/listForReturn',
    method: 'post',
    data: data
  })
}
export function getInfoForReturn(data) {
  return request({
    url: '/production/task/getInfoForReturn/' + data,
    method: 'get'
  })
}
